// 时间
export const dateOne = (e) => {
    let date = new Date(e);
    let year = date.getFullYear();
    let mouth = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
    let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
    // 返回时间
    return year + "." + mouth + "." + day;
}

// 获取图片的URL地址
export const getObjectURL = (file) => {
    let url = null;
    if(window.createObjectURL != undefined) {
        url = window.createObjectURL(file);
    }
    else if(window.URL != undefined) {
        url = window.URL.createObjectURL(file);
    }
    else if(window.webkitURL != undefined) {
        url = window.webkitURL.createObjectURL(file);
    }
    return url;
}
